<?php
header('Content-Type:text/html;charset=UTF-8');

@$did = $_REQUEST['did'];

@$eid = $_REQUEST['eid'];

if(empty($did)){
	$mes = '你还未选定餐桌.........................';
	include 'main.php';
	die;
}

require 'lib/db.php';

if(!empty($eid)){
	dbInsert('insert into object(desk_id,entry_id) values(:did,:eid)',array('did'=>$did,'eid'=>$eid));
}

header('Location:main.php?did='.$did);
